home *** CD-ROM | disk | FTP | other *** search
/ Delphi Programmer's Power Pack / Delphi Volume 1.iso / e_to_l / iacs / setup.arv / UNIT3.PAS < prev    next >
Encoding:
Pascal/Delphi Source File  |  1996-09-15  |  1.6 KB  |  71 lines

  1. unit Unit3;
  2.  
  3. interface
  4.  
  5. uses
  6.   SysUtils, WinTypes, WinProcs, Messages, Classes, Graphics, Controls,
  7.   Forms, Dialogs, Iabuttns, StdCtrls, Iaconn, Iadialgs;
  8.  
  9. type
  10.   TForm1 = class(TForm)
  11.     Edit1: TEdit;
  12.     Button1: TButton;
  13.     Edit2: TEdit;
  14.     Button2: TButton;
  15.     IASaveDialog1: TIASaveDialog;
  16.     IAOpenDialog1: TIAOpenDialog;
  17.     IASource1: TIASource;
  18.     Label1: TLabel;
  19.     Label2: TLabel;
  20.     IASRButton1: TIASRButton;
  21.     Button3: TButton;
  22.     IASRButton2: TIASRButton;
  23.     procedure FormCreate(Sender: TObject);
  24.     procedure Button1Click(Sender: TObject);
  25.     procedure Button2Click(Sender: TObject);
  26.     procedure FormClose(Sender: TObject; var Action: TCloseAction);
  27.     procedure Button3Click(Sender: TObject);
  28.   private
  29.     { Private declarations }
  30.   public
  31.     { Public declarations }
  32.   end;
  33.  
  34. var
  35.   Form1: TForm1;
  36.  
  37. implementation
  38.  
  39. {$R *.DFM}
  40.  
  41. procedure TForm1.FormCreate(Sender: TObject);
  42. begin
  43.   IASource1.FileName := ExtractFilePath( Application.ExeName) + IASource1.FileName;
  44.   IASource1.UpdateControls;
  45. end;
  46.  
  47. procedure TForm1.Button1Click(Sender: TObject);
  48. begin
  49.   If IAOpenDialog1.Execute then
  50.     Edit1. Text:=IAOpenDialog1.FileName;
  51. end;
  52.  
  53. procedure TForm1.Button2Click(Sender: TObject);
  54. begin
  55.   If IASaveDialog1.Execute then
  56.     Edit2.Text:=IASaveDialog1.FileName;
  57. end;
  58.  
  59. procedure TForm1.FormClose(Sender: TObject; var Action: TCloseAction);
  60. begin
  61.   IASource1.UpdateFile;
  62. end;
  63.  
  64. procedure TForm1.Button3Click(Sender: TObject);
  65. begin
  66.   IASaveDialog1.HistoryList.Clear;
  67.   IAOpenDialog1.HistoryList.Clear;
  68. end;
  69.  
  70. end.
  71.